package v1

import (
	"github.com/gin-gonic/gin"
	"meditate/logger"
)

type Ping struct {
 }

var DefaultPing = Ping{
 }

func (*Ping) Register(g *gin.RouterGroup) {
	g.GET("/ping", DefaultPing.ping)
}

func (p *Ping) ping(c *gin.Context) {
	logger.Lg.Info("get ping")

	c.JSON(200, gin.H{
		"message": "pong",
	})
}
